import { CHECC_API_BASE_DATA } from '@/constants/proxy'
import request from '@/utils/request'
//车流量
//分页获取
export function getVolume(data:any,item:any) {
  return request({
    url: CHECC_API_BASE_DATA + '/bd-traffic-flow/page',
    method: 'post',
    data:data,
    params:item
  })
}
// 车流量新增、编辑及删除
export function batchVolume(data: any){
  return request({
    url: CHECC_API_BASE_DATA + '/bd-traffic-flow',
    method: data.method,
    data:data.data,
  })
}
// 通过ID获取数据
export function queryVolume(id: any){
  return request({
    url: CHECC_API_BASE_DATA + `/bd-traffic-flow/${id}`,
    method:'GET',
  })
}
// 锁定/解锁
export function lockingVolume(data: any){
  return request({
    url: CHECC_API_BASE_DATA + '/bd-traffic-flow/lock',
    method:'post',
    data
  })
}
//通行费
// 分页获取
export function getToll(data:any,item:any) {
  return request({
    url: CHECC_API_BASE_DATA + '/bd-toll-data/page',
    method: 'post',
    data:data,
    params:item
  })
}
// 新增及编辑
export function batchToll(data: any){
  return request({
    url: CHECC_API_BASE_DATA + '/bd-toll-data',
    method: data.method,
    data:data.data,
  })
}
// 通过ID获取数据
export function queryToll(id: any){
  return request({
    url: CHECC_API_BASE_DATA + `/bd-toll-data/${id}`,
    method:'GET',
  })
}
// 解锁锁定
export function lockingToll(data: any){
  return request({
    url: CHECC_API_BASE_DATA + '/bd-toll-data/lock',
    method:'post',
    data
  })
}

//获取路段数据
export function getRoadSection(data: any){
  return request({
    url: CHECC_API_BASE_DATA + '/bd-fixed-section/list',
    method:'post',
    data
  })
}